package com.su.test;

//用来测试的
public class demo {
    public static void main(String[] args) {
        int initArr[] = {2,0,3,1,8,4,7,6,5};
        int targetArr[] = {2,0,4,1,3,8,7,6,5};
        NumCode numCode = new NumCode();
        try{
            numCode.setInitArr(initArr);
//            int targetArr[] = numCode.generateTargetArr(4);
            numCode.setTargetArr(targetArr);
            numCode.setStrategy(new SuperAalgorithm());
            numCode.run();
            numCode.show();
            System.out.println("算法类型: A*算法");
            System.out.println("实际步数: "+numCode.getSteps());
            System.out.println("最佳步数: "+numCode.getBestSteps());
            System.out.println("耗时: "+numCode.getTime() + "微秒");
        }catch (Exception e){
            System.out.println(e.getMessage());
        }
    }
}
